using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.H_ChannelTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HL_ChannelTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HL_ChannelTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HL_Channel";
			dataTableMapping.ColumnMappings.Add("ChannelID", "ChannelID");
			dataTableMapping.ColumnMappings.Add("ChannelName", "ChannelName");
			dataTableMapping.ColumnMappings.Add("EnableChannelPic", "EnableChannelPic");
			dataTableMapping.ColumnMappings.Add("ChannelPicUrl", "ChannelPicUrl");
			dataTableMapping.ColumnMappings.Add("ChannelIntro", "ChannelIntro");
			dataTableMapping.ColumnMappings.Add("ChannelURl", "ChannelURl");
			dataTableMapping.ColumnMappings.Add("ChannelOpenType", "ChannelOpenType");
			dataTableMapping.ColumnMappings.Add("Status", "Status");
			dataTableMapping.ColumnMappings.Add("ChannelAccess", "ChannelAccess");
			dataTableMapping.ColumnMappings.Add("Charge", "Charge");
			dataTableMapping.ColumnMappings.Add("MetaKeywords", "MetaKeywords");
			dataTableMapping.ColumnMappings.Add("UploadDir", "UploadDir");
			dataTableMapping.ColumnMappings.Add("DaysOfNew", "DaysOfNew");
			dataTableMapping.ColumnMappings.Add("TemplateIndex", "TemplateIndex");
			dataTableMapping.ColumnMappings.Add("UseCreateHTML", "UseCreateHTML");
			dataTableMapping.ColumnMappings.Add("HitsCount", "HitsCount");
			dataTableMapping.ColumnMappings.Add("FileNameType", "FileNameType");
			dataTableMapping.ColumnMappings.Add("FileExt_Index", "FileExt_Index");
			dataTableMapping.ColumnMappings.Add("FileExt_Item", "FileExt_Item");
			dataTableMapping.ColumnMappings.Add("MaxPerPage", "MaxPerPage");
			dataTableMapping.ColumnMappings.Add("ChannelPriview", "ChannelPriview");
			dataTableMapping.ColumnMappings.Add("MoneyPayStandard", "MoneyPayStandard");
			dataTableMapping.ColumnMappings.Add("EmailOfReject", "EmailOfReject");
			dataTableMapping.ColumnMappings.Add("EmailOfPassed", "EmailOfPassed");
			dataTableMapping.ColumnMappings.Add("CustomContent", "CustomContent");
			dataTableMapping.ColumnMappings.Add("OrderID", "OrderID");
			dataTableMapping.ColumnMappings.Add("ChannelDir", "ChannelDir");
			dataTableMapping.ColumnMappings.Add("UploadFileType", "UploadFileType");
			dataTableMapping.ColumnMappings.Add("ModuleType", "ModuleType");
			dataTableMapping.ColumnMappings.Add("ChannelType", "ChannelType");
			dataTableMapping.ColumnMappings.Add("MaxUploadFileSize", "MaxUploadFileSize");
			dataTableMapping.ColumnMappings.Add("HitsOfHot", "HitsOfHot");
			dataTableMapping.ColumnMappings.Add("DefaultSkinID", "DefaultSkinID");
			dataTableMapping.ColumnMappings.Add("arrGroupID", "arrGroupID");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HL_Channel] WHERE (([ChannelID] = @Original_ChannelID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_ChannelID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HL_Channel] ([Charge], [ChannelAccess], [Status], [ChannelOpenType], [ChannelURl], [ChannelIntro], [ChannelPicUrl], [EnableChannelPic], [ChannelName], [MetaKeywords], [UploadDir], [DaysOfNew], [TemplateIndex], [UseCreateHTML], [HitsCount], [FileNameType], [FileExt_Index], [FileExt_Item], [MaxPerPage], [ChannelPriview], [MoneyPayStandard], [EmailOfReject], [EmailOfPassed], [CustomContent], [OrderID], [ChannelDir], [UploadFileType], [ModuleType], [ChannelType], [MaxUploadFileSize], [HitsOfHot], [DefaultSkinID], [arrGroupID]) VALUES (@Charge, @ChannelAccess, @Status, @ChannelOpenType, @ChannelURl, @ChannelIntro, @ChannelPicUrl, @EnableChannelPic, @ChannelName, @MetaKeywords, @UploadDir, @DaysOfNew, @TemplateIndex, @UseCreateHTML, @HitsCount, @FileNameType, @FileExt_Index, @FileExt_Item, @MaxPerPage, @ChannelPriview, @MoneyPayStandard, @EmailOfReject, @EmailOfPassed, @CustomContent, @OrderID, @ChannelDir, @UploadFileType, @ModuleType, @ChannelType, @MaxUploadFileSize, @HitsOfHot, @DefaultSkinID, @arrGroupID)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Charge", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Charge", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChannelAccess", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelAccess", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Status", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Status", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChannelOpenType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelOpenType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChannelURl", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ChannelURl", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChannelIntro", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ChannelIntro", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChannelPicUrl", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ChannelPicUrl", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@EnableChannelPic", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "EnableChannelPic", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChannelName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ChannelName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@MetaKeywords", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "MetaKeywords", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UploadDir", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "UploadDir", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@DaysOfNew", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "DaysOfNew", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@TemplateIndex", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "TemplateIndex", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UseCreateHTML", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UseCreateHTML", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@HitsCount", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "HitsCount", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@FileNameType", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "FileNameType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@FileExt_Index", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "FileExt_Index", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@FileExt_Item", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "FileExt_Item", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@MaxPerPage", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "MaxPerPage", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChannelPriview", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelPriview", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@MoneyPayStandard", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 0, "MoneyPayStandard", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@EmailOfReject", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "EmailOfReject", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@EmailOfPassed", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "EmailOfPassed", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@CustomContent", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "CustomContent", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OrderID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChannelDir", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ChannelDir", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UploadFileType", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "UploadFileType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ModuleType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ModuleType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ChannelType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@MaxUploadFileSize", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "MaxUploadFileSize", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@HitsOfHot", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "HitsOfHot", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@DefaultSkinID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "DefaultSkinID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@arrGroupID", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "arrGroupID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HL_Channel] SET [Charge] = @Charge, [ChannelAccess] = @ChannelAccess, [Status] = @Status, [ChannelOpenType] = @ChannelOpenType, [ChannelURl] = @ChannelURl, [ChannelIntro] = @ChannelIntro, [ChannelPicUrl] = @ChannelPicUrl, [EnableChannelPic] = @EnableChannelPic, [ChannelName] = @ChannelName, [MetaKeywords] = @MetaKeywords, [UploadDir] = @UploadDir, [DaysOfNew] = @DaysOfNew, [TemplateIndex] = @TemplateIndex, [UseCreateHTML] = @UseCreateHTML, [HitsCount] = @HitsCount, [FileNameType] = @FileNameType, [FileExt_Index] = @FileExt_Index, [FileExt_Item] = @FileExt_Item, [MaxPerPage] = @MaxPerPage, [ChannelPriview] = @ChannelPriview, [MoneyPayStandard] = @MoneyPayStandard, [EmailOfReject] = @EmailOfReject, [EmailOfPassed] = @EmailOfPassed, [CustomContent] = @CustomContent, [OrderID] = @OrderID, [ChannelDir] = @ChannelDir, [UploadFileType] = @UploadFileType, [ModuleType] = @ModuleType, [ChannelType] = @ChannelType, [MaxUploadFileSize] = @MaxUploadFileSize, [HitsOfHot] = @HitsOfHot, [DefaultSkinID] = @DefaultSkinID, [arrGroupID] = @arrGroupID WHERE (([ChannelID] = @Original_ChannelID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Charge", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Charge", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChannelAccess", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelAccess", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Status", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Status", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChannelOpenType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelOpenType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChannelURl", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ChannelURl", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChannelIntro", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ChannelIntro", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChannelPicUrl", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ChannelPicUrl", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@EnableChannelPic", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "EnableChannelPic", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChannelName", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ChannelName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@MetaKeywords", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "MetaKeywords", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UploadDir", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "UploadDir", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@DaysOfNew", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "DaysOfNew", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@TemplateIndex", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "TemplateIndex", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UseCreateHTML", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UseCreateHTML", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@HitsCount", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "HitsCount", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@FileNameType", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "FileNameType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@FileExt_Index", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "FileExt_Index", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@FileExt_Item", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "FileExt_Item", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@MaxPerPage", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "MaxPerPage", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChannelPriview", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelPriview", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@MoneyPayStandard", SqlDbType.Decimal, 0, ParameterDirection.Input, 18, 0, "MoneyPayStandard", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@EmailOfReject", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "EmailOfReject", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@EmailOfPassed", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "EmailOfPassed", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@CustomContent", SqlDbType.Text, 0, ParameterDirection.Input, 0, 0, "CustomContent", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OrderID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChannelDir", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "ChannelDir", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UploadFileType", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "UploadFileType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ModuleType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ModuleType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ChannelType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@MaxUploadFileSize", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "MaxUploadFileSize", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@HitsOfHot", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "HitsOfHot", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@DefaultSkinID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "DefaultSkinID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@arrGroupID", SqlDbType.VarChar, 0, ParameterDirection.Input, 0, 0, "arrGroupID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_ChannelID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[4];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT     Charge, ChannelAccess, Status, ChannelOpenType, ChannelURl, ChannelIntro, ChannelPicUrl, EnableChannelPic, ChannelName, ChannelID, \r\n                      MetaKeywords, UploadDir, DaysOfNew, TemplateIndex, UseCreateHTML, HitsCount, FileNameType, FileExt_Index, FileExt_Item, MaxPerPage, \r\n                      ChannelPriview, MoneyPayStandard, EmailOfReject, EmailOfPassed, CustomContent, OrderID, ChannelDir, UploadFileType, ModuleType, \r\n                      ChannelType, MaxUploadFileSize, HitsOfHot, DefaultSkinID, arrGroupID\r\nFROM         HL_Channel\r\nORDER BY ChannelID DESC";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "DELETE FROM [HL_Channel] WHERE (([ChannelID] = @ChannelID))    AND ChannelID  NOT BETWEEN 1 AND 1000\r\n";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@ChannelID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "SELECT ChannelAccess, ChannelDir, ChannelID, ChannelIntro, ChannelName, ChannelOpenType, ChannelPicUrl, ChannelPriview, ChannelType, ChannelURl, Charge, CustomContent, DaysOfNew, DefaultSkinID, EmailOfPassed, EmailOfReject, EnableChannelPic, FileExt_Index, FileExt_Item, FileNameType, HitsCount, HitsOfHot, MaxPerPage, MaxUploadFileSize, MetaKeywords, ModuleType, MoneyPayStandard, OrderID, Status, TemplateIndex, UploadDir, UploadFileType, UseCreateHTML, arrGroupID FROM HL_Channel WHERE (ChannelID = @ChannelID)";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[2].Parameters.Add(new SqlParameter("@ChannelID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "ChannelID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "SELECT ChannelAccess, ChannelDir, ChannelID, ChannelIntro, ChannelName, ChannelOpenType, ChannelPicUrl, ChannelPriview, ChannelType, ChannelURl, Charge, CustomContent, DaysOfNew, DefaultSkinID, EmailOfPassed, EmailOfReject, EnableChannelPic, FileExt_Index, FileExt_Item, FileNameType, HitsCount, HitsOfHot, MaxPerPage, MaxUploadFileSize, MetaKeywords, ModuleType, MoneyPayStandard, OrderID, Status, TemplateIndex, UploadDir, UploadFileType, UseCreateHTML, arrGroupID FROM HL_Channel WHERE (ChannelURl = @ChannelURL)";
			this._commandCollection[3].CommandType = CommandType.Text;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@ChannelURL", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, "ChannelURl", DataRowVersion.Current, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Channel.HL_ChannelDataTable GetChannels()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			H_Channel.HL_ChannelDataTable hL_ChannelDataTable = new H_Channel.HL_ChannelDataTable();
			this.Adapter.Fill(hL_ChannelDataTable);
			return hL_ChannelDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Channel.HL_ChannelDataTable GetChannelByChannelID(int ChannelID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			this.Adapter.SelectCommand.Parameters[0].Value = ChannelID;
			H_Channel.HL_ChannelDataTable hL_ChannelDataTable = new H_Channel.HL_ChannelDataTable();
			this.Adapter.Fill(hL_ChannelDataTable);
			return hL_ChannelDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual H_Channel.HL_ChannelDataTable GetChannelByURL(string ChannelURL)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			if (ChannelURL == null)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = ChannelURL;
			}
			H_Channel.HL_ChannelDataTable hL_ChannelDataTable = new H_Channel.HL_ChannelDataTable();
			this.Adapter.Fill(hL_ChannelDataTable);
			return hL_ChannelDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(H_Channel.HL_ChannelDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(H_Channel dataSet)
		{
			return this.Adapter.Update(dataSet, "HL_Channel");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteChannel(int ChannelID)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			sqlCommand.Parameters[0].Value = ChannelID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
